package com.usefullc.crawler.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.usefullc.system.entity.BaseEntity;
import com.usefullc.system.service.component.extend.ApiField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 爬虫模板实体
 * @author: 星空
 * @date: 2022-07-26
 */
@ApiModel("爬虫模板")
@TableName("crawler_template")
@Data
public class Template extends BaseEntity {

//useful_auto_generate_section_start

    @ApiModelProperty(notes = "ban是否直接换代理")
    @TableField(value="`banSwitchProxy`")
    private Integer banSwitchProxy;

    @ApiModelProperty(notes = "描述")
    @TableField(value="`description`")
    private String description;

    @ApiModelProperty(notes = "是否开启图片")
    @TableField(value="`enableImage`")
    private Integer enableImage;

    @ApiModelProperty(notes = "是否开启javascript")
    @TableField(value="`enableJavascript`")
    private Integer enableJavascript;

    @ApiModelProperty(notes = "是否开启代理")
    @TableField(value="`enableProxy`")
    private Integer enableProxy;

    @ApiModelProperty(notes = "是否开启样式")
    @TableField(value="`enableStyle`")
    private Integer enableStyle;

    @ApiModelProperty(notes = "处理方式(selenium,httpClient")
    @TableField(value="`handlerType`")
    private String handlerType;

    @ApiModelProperty(notes = "模板名称")
    @TableField(value="`name`")
    private String name;

    @ApiModelProperty(notes = "随机毫秒数 比如1-3秒 1000-3000")
    @TableField(value="`runRdMs`")
    private String runRdMs;

    @ApiModelProperty(notes = "抽样类型(0 数字 ,2 比例)")
    @TableField(value="`sampleType`")
    private Integer sampleType;

    @ApiModelProperty(notes = "抽样数值（如果是比例，取值范围1-100)")
    @TableField(value="`sampleValue`")
    private Integer sampleValue;

    @ApiModelProperty(notes = "是否保存页面source")
    @TableField(value="`storePageSource`")
    private Integer storePageSource;

    @ApiModelProperty(notes = "变量")
    @TableField(value="`variables`")
    private String variables;

//useful_auto_generate_section_end

    @ApiModelProperty(notes = "变量配置")
    @TableField(value="`variablesConfig`")
    private String variablesConfig;

    @ApiModelProperty(notes = "预览数据")
    @TableField(value="`previewData`")
    private String previewData;

    @ApiModelProperty(notes = "模板类型（0 公共，1 私有）")
    @TableField(value="`type`")
    private Integer type;

    @ApiModelProperty(notes = "复制模版ID")
    private Long copyTemplateId;

    @ApiModelProperty(notes = "用户ID")
    private Long userId;

    @ApiModelProperty(notes = "最后运行状态（0 初始化；1 运行中；2 暂停; 3 完成 ）")
    private Integer status;

    @ApiModelProperty(notes = "行业")
    private Integer industry;

    @ApiModelProperty(notes = "标签")
    private String tags;

    @ApiModelProperty(notes = "网站域名")
    private String websiteDomain;

    @ApiModelProperty(notes = "图标")
    private String icon;


}
